package com.rk.kbk.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rk.kbk.common.DateJsonDeserializer;
import com.rk.kbk.common.DateJsonSerializer;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import javax.persistence.*;

/**
 * @Account
 * @用户商家账户(account)
 * @version : Ver 1.0
 */
@Entity
public class Account implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:骑手测试
	 * @字段:id BIGINT(19)
	 */
	@Id
	@GeneratedValue(strategy= GenerationType.IDENTITY)
	@GenericGenerator(name="auto-identity",strategy="identity")
	@Column(updatable = false, columnDefinition="BIGINT(19) COMMENT '骑手测试'")
	private java.lang.Long id;

	/**
	 * @备注:骑手/商家id
	 * @字段:user BIGINT(19)
	 */
	@ManyToOne
	@JoinColumn(name="user", columnDefinition="BIGINT(19) COMMENT '骑手/商家id'")
	private User user;

	/**
	 * @备注:余额
	 * @字段:all_money DOUBLE(22)
	 */
	@Column(columnDefinition="DOUBLE(22) COMMENT '余额'")
	private java.lang.Double allMoney;

	/**
	 * @备注:冻结金额
	 * @字段:block_money DOUBLE(22)
	 */
	@Column(columnDefinition="DOUBLE(22) COMMENT '冻结金额'")
	private java.lang.Double blockMoney;

	/**
	 * @备注:押金
	 * @字段:deposit_money DOUBLE(22)
	 */
	@Column(columnDefinition="DOUBLE(22) COMMENT '押金'")
	private java.lang.Double depositMoney;

	/**
	 * @备注:冻结押金
	 * @字段:block_deposit_money DOUBLE(22)
	 */
	@Column(columnDefinition="DOUBLE(22) COMMENT '冻结押金'")
	private java.lang.Double blockDepositMoney;

	/**
	 * @备注:账户状态，1表示正常，2表示冻结
	 * @字段:status INT(10)
	 */
	@Column(columnDefinition="INT(10) COMMENT '账户状态，1表示正常，2表示冻结'")
	private java.lang.Integer status;

	/**
	 * @备注:答题时间
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@Column(updatable = false, columnDefinition="DATETIME(19) COMMENT '答题时间'")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime = new java.util.Date();

	/**
	 * @备注:修改时间
	 * @字段:upt_datetime DATETIME(19)
	 */
	@Column(columnDefinition="DATETIME(19) COMMENT '修改时间'")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date uptDatetime = new java.util.Date();

	public Account(){
	}

	public Account(
		java.lang.Long id
	){
		this.id = id;
	}



	public void setId(java.lang.Long id) {
		this.id = id;
	}

	public java.lang.Long getId() {
		return this.id;
	}


	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void setAllMoney(java.lang.Double allMoney) {
		this.allMoney = allMoney;
	}

	public java.lang.Double getAllMoney() {
		return this.allMoney;
	}


	public void setBlockMoney(java.lang.Double blockMoney) {
		this.blockMoney = blockMoney;
	}

	public java.lang.Double getBlockMoney() {
		return this.blockMoney;
	}


	public void setDepositMoney(java.lang.Double depositMoney) {
		this.depositMoney = depositMoney;
	}

	public java.lang.Double getDepositMoney() {
		return this.depositMoney;
	}


	public void setBlockDepositMoney(java.lang.Double blockDepositMoney) {
		this.blockDepositMoney = blockDepositMoney;
	}

	public java.lang.Double getBlockDepositMoney() {
		return this.blockDepositMoney;
	}


	public void setStatus(java.lang.Integer status) {
		this.status = status;
	}

	public java.lang.Integer getStatus() {
		return this.status;
	}


	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}


	public void setUptDatetime(java.util.Date uptDatetime) {
		this.uptDatetime = uptDatetime;
	}

	public java.util.Date getUptDatetime() {
		return this.uptDatetime;
	}
}
